package vow.gui.models;

import java.util.List;

import javax.swing.AbstractListModel;
import javax.swing.JList;

import econtract.simple.Contract;
import econtract.simple.NormType;


public class NormsListModel extends AbstractListModel{

	private List<NormType> norms;
	
	public  NormsListModel(JList list){
		Contract c = (Contract) list.getSelectedValue();
		norms = c.getNorms().getNorm();
	}
	
	@Override
	public Object getElementAt(int index) {
		return norms.get(index);
	}

	@Override
	public int getSize() {
		return norms.size();
	}
	
}